KA

[HELP] SPELL

Por kamus9629, 22 de dez. de 2016 em Resolvidos

2
808
kamus9629K
22 de dezembro de 2016 às 21:03

Alguel Pode ME Ajudar Colocar A função Nessa SPell exemplo Eu quero Que  A Minha Spell Quando Usa Sword A Magia Hit Mais Vou coloca Base Das 2 Scripter VLW a segunda BASE NAO PRECISA EDITAR PORQUE E SO PARA VOCES TIRAREM FUNÇÃO DELA PARA COLOCA NA PRIMEIRA

 

ESSA SCRIPTER QE TOU TENTANDO COLOCA FUNçÃOlocal function onDash(cid, level, skill, attack, factor)	if not isCreature(cid) then		return true	endlocal level = getPlayerLevel(cid) local jutsuDmg = 15skill = getPlayerSkill(cid, SKILL_SWORD)local skill_total = math.ceil((jutsuSkill_factor(cid, 0) + skill + level)/2)local dmg = - math.max(1, math.ceil(((skill_total*0.5) * jutsuDmg)*0.25)) local poslook = getCreatureLookPosition(cid) poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE     if isWalkable(poslook, false, false, true) then     if not isCreature(getThingfromPos(poslook).uid) then          doMoveCreature(cid, getPlayerLookDirection(cid))     return TRUE      else          doMoveCreature(cid, getPlayerLookDirection(cid))          doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, getCreaturePosition(cid), area, dmg, dmg, efeito)     return TRUE      end       end       endfunction iniciarEntry(cid)	if not isCreature(cid) then		return true	end         addEvent(actionMove, 0, cid, 519, 10)         addEvent(actionMove, 100, cid, 519, 10)         addEvent(actionMove, 200, cid, 519, 10)         addEvent(actionMove, 300, cid, 519, 10)endfunction finalizarEntry(cid)	if not isCreature(cid) then		return true	end         addEvent(actionMove, 400, cid, 519, 10)         addEvent(actionMove, 500, cid, 519, 10)         addEvent(doRemoveCondition, 600, cid, CONDITION_OUTFIT)endlocal function dash(cid)	if not isCreature(cid) then		return true	end local distance = 5      for i = 0, distance do      addEvent(onDash,0*i,cid)       endendfunction onCastSpell(cid, var)local p = getCreaturePosition(cid)local x = {[0] = {x=p.x+0, y=p.y-1, z=p.z},[1] = {x=p.x+6, y=p.y+0, z=p.z},[2] = {x=p.x+0, y=p.y+6, z=p.z},[3] = {x=p.x-0, y=p.y+0, z=p.z}}local y = {[0] = 259,[1] = 258,[2] = 257,[3] = 260}pos = x[getCreatureLookDirection(cid)]eff = y[getCreatureLookDirection(cid)]doSendMagicEffect(pos, eff)	if not isCreature(cid) then		return true	end		 noMove(cid, 1)	         iniciarEntry(cid)		 setPlayerStorageValue(cid, STORAGE_DIRECTION, 1)         addEvent(dash, 0, cid)		 addEvent(function()		 if not isCreature(cid) then return true end		 setPlayerStorageValue(cid, STORAGE_DIRECTION, 0)		 end, 1000)         addEvent(finalizarEntry, 1000, cid)         addEvent(doCreatureSay, 100, cid, "Hanauta Sanchou", TALKTYPE_MONSTER)		 addEvent(doCreatureSay, 600, cid, " Yahazu Giri!!", TALKTYPE_MONSTER)return falseend 
Base Da Função local AREA = {  {0, 1, 1, 1, 0},  {1, 1, 1, 1, 1},    {1, 1, 3, 1, 1},  {1, 1, 1, 1, 1},  {0, 1, 1, 1, 0},    }  function callback_formula(cid, level, skill, attack, factor)  skill = getPlayerSkill(cid, SKILL_SWORD)  local skill_total = skill + attack / 2.0  local level_total = level / 2.5  return -(skill_total * 4.51 + level_total), -(skill_total * 6.5 + level_total)   endlocal AirSlash = ClassSpell:new():setType():setArea(AREA):setCallbackSkill('callback_formula')    local function air_slash(cid, var, fase)  local pos = getPlayerPosition(cid)  if fase == 1 then    doSendMagicEffect({x = pos.x + 1, y = pos.y - 1, z = pos.z}, 158)    doSendMagicEffect({x = pos.x + 2, y = pos.y + 1, z = pos.z}, 161)        doSendMagicEffect({x = pos.x + 1, y = pos.y + 2, z = pos.z}, 159)        doSendMagicEffect({x = pos.x - 1, y = pos.y + 1, z = pos.z}, 160)  elseif fase == 2 then    doSendMagicEffect({x = pos.x + 2, y = pos.y - 2, z = pos.z}, 154)    doSendMagicEffect({x = pos.x + 2, y = pos.y + 1, z = pos.z}, 155)        doSendMagicEffect({x = pos.x + 1, y = pos.y + 2, z = pos.z}, 157)        doSendMagicEffect({x = pos.x - 1, y = pos.y + 0, z = pos.z}, 156)    end  if fase < 3 then    --addEvent(air_slash, 600, cid, var, fase + 1)  end    end    function onCastSpell(cid, var)  if not isAbleToCastSpell(cid, 308) then    return false  end    air_slash(cid, var, 1)      return AirSlash:cast(cid, var)end     
DeadpoolD
22 de dezembro de 2016 às 21:12

Caro membro, seu tópico foi movido de Scripts > Otserv > Globalevents, spells e creatureevents para Otserv > Suporte Otserv.

 

Amigo, arruma teu portugues, porquê eu não entendi nada e acho difícil alguém te ajudar com essa ortografia..